const mongoose = require('mongoose')

const schema = new mongoose.Schema({
    grade: {
        //分数
        type: Number
    },
    course: {
        //课程信息ID
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'Course'
    },
    student: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'Student', //对应学生
    },
    xf: {
        type:Number
    },
    gpa: {
        type: Number,
        //绩点
    },
    isEdit: {
        type: Boolean
    } //有没有被编辑过，如果有被编辑过，则显示在学生面前，老师那里就没有编辑按钮
})

module.exports = mongoose.model('Grade', schema)